﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPages/Core.Master"
    CodeBehind="MainCommitteeDeposite.aspx.cs" Inherits="Pap.Web.Modules.Loan.Views.MainCommitteeDeposite"
    meta:resourcekey="PageResource1" %>

<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <ext:Store runat="server" ID="storeMainCommitteeDeposites" AutoLoad="True" IDMode="Legacy"
        meta:resourcekey="storeMainCommitteeDepositesResource1" SerializationMode="Simple">
        <Reader>
            <ext:JsonReader>
                <Fields>
                    <ext:RecordField Name="DepositDate">
                        <Convert Handler="" Args="value,record" FormatHandler="False"></Convert>
                    </ext:RecordField>
                    <ext:RecordField Name="Amount">
                        <Convert Handler="" Args="value,record" FormatHandler="False"></Convert>
                    </ext:RecordField>
                    <ext:RecordField Name="ProjectName">
                        <Convert Handler="" Args="value,record" FormatHandler="False"></Convert>
                    </ext:RecordField>
                </Fields>
            </ext:JsonReader>
        </Reader>
        <SortInfo Direction="ASC"></SortInfo>
    </ext:Store>
    <ext:Store runat="server" ID="storeProjects" AutoLoad="True" IDMode="Legacy" meta:resourcekey="storeProjectsResource1"
        SerializationMode="Simple">
        <Reader>
            <ext:JsonReader ReaderID="ProjectID">
                <Fields>
                    <ext:RecordField Name="ProjectID" />
                    <ext:RecordField Name="ProjectName" />
                </Fields>
            </ext:JsonReader>
        </Reader>
        <SortInfo Direction="ASC"></SortInfo>
    </ext:Store>
    <ext:FitLayout runat="server" meta:resourcekey="FitLayoutResource1" IDMode="Legacy">
        <ext:Panel runat="server" AutoScroll="true" meta:resourcekey="PanelResource1">
            <Body>
                <ext:FormPanel runat="server" ID="panelData" IDMode="Static" Title=" Association Deposits Details"
                    ElementStyle="" meta:resourcekey="panelDataResource1">
                    <Body>
                        <ext:FormLayout runat="server" meta:resourcekey="FormLayoutResource1" ElementStyle=""
                            ItemCls="">
                            <ext:Anchor>
                                <ext:TextField runat="server" ID="txtAssociationName" FieldLabel="AssociationName"
                                    Disabled="True" AllowBlank="False" meta:resourcekey="txtAssociationNameResource1"
                                    Text="" />
                            </ext:Anchor>
                            <ext:Anchor>
                                <ext:ComboBox ValueField="ProjectID" DisplayField="ProjectName" runat="server" ID="cmbProjects"
                                    meta:resourcekey="cmbProjectsResource" AllowBlank="false" StoreID="storeProjects"
                                    Editable="false">
                                    <AjaxEvents>
                                        <Select OnEvent="CmbProjects_Changed">
                                            <EventMask ShowMask="true" />
                                        </Select>
                                    </AjaxEvents>
                                </ext:ComboBox>
                            </ext:Anchor>
                            <ext:Anchor>
                                <ext:TextField runat="server" ID="txtAssociationBalance" Disabled="True" AllowBlank="False"
                                    meta:resourcekey="txtAssociationBalanceResource1">
                                </ext:TextField>
                            </ext:Anchor>
                            <ext:Anchor Horizontal="50%">
                                <ext:DateField runat="server" ID="dateDepositDate" FieldLabel="dateDepositDate" AllowBlank="False"
                                    MaxDate="" meta:resourcekey="dateDepositDateResource1" MinDate="" SelectedDate="" />
                            </ext:Anchor>
                            <ext:Anchor Horizontal="50%">
                                <ext:NumberField runat="server" ID="txtDepositAmount" FieldLabel="WithdrawAmount"
                                    AllowNegative="False" MaxValue="999999999999999" MinValue="1" AllowBlank="False" meta:resourcekey="txtDepositAmountResource1" />
                            </ext:Anchor>
                        </ext:FormLayout>
                    </Body>
                    <BottomBar>
                        <ext:StatusBar runat="server" meta:resourcekey="StatusBarResource1" DefaultText=""
                            IDMode="Static">
                            <Items>
                                <ext:Button runat="server" ID="btnDeposit" Text="Deposit" IDMode="Static" meta:resourcekey="btnDepositResource1">
                                    <AjaxEvents>
                                        <Click OnEvent="BtnDeposit_Clicked" Before="return Ext.getCmp('panelData').getForm().isValid();">
                                            <EventMask ShowMask="True" />
                                        </Click>
                                    </AjaxEvents>
                                </ext:Button>
                            </Items>
                        </ext:StatusBar>
                    </BottomBar>
                </ext:FormPanel>
                <ext:GridPanel runat="server" ID="gridMainBranchDeposites" StoreID="storeMainCommitteeDeposites"
                    AutoHeight="True" Title="Main Branch Deposites" AutoWidth="True" meta:resourcekey="gridMainBranchDepositesResource1">
                    <ColumnModel>
                        <Columns>
                            <ext:Column DataIndex="DepositDate" Header="<%$ Resources:HeaderDepositDate %>" Sortable="True">
                                <PrepareCommand Args="grid,command,record,row,col,value" FormatHandler="False" Handler="" />
                                <PrepareCommands Args="grid,commands,record,row,col,value" FormatHandler="False"
                                    Handler="" />
                                <Renderer Fn="Ext.util.Format.dateRenderer('d/m/Y')" />
                            </ext:Column>
                            <ext:Column DataIndex="Amount" Header="<%$ Resources:HeaderAmount %>" Sortable="True">
                                <PrepareCommand Args="grid,command,record,row,col,value" FormatHandler="False" Handler="" />
                                <PrepareCommands Args="grid,commands,record,row,col,value" FormatHandler="False"
                                    Handler="" />
                            </ext:Column>
                            <ext:Column DataIndex="ProjectName" Header="<%$ Resources:HeaderProjectName %>" Sortable="True">
                                <PrepareCommand Args="grid,command,record,row,col,value" FormatHandler="False" Handler="" />
                                <PrepareCommands Args="grid,commands,record,row,col,value" FormatHandler="False"
                                    Handler="" />
                            </ext:Column>
                        </Columns>
                    </ColumnModel>
                </ext:GridPanel>
            </Body>
        </ext:Panel>
    </ext:FitLayout>
</asp:Content>
